﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsultasLogopedia.Core.Controllers
{

    public interface IGenericReadOnlyBusinessController<T, ID>
    {
        /// <summary>
        /// Gets by id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetById(ID id);

        /// <summary>
        /// Cunts all entities
        /// </summary>
        /// <returns></returns>
        int CountAll();

        /// <summary>
        /// Finds all entities
        /// </summary>
        /// <returns></returns>
        IList<T> FindAll();

        /// <summary>
        /// Finds all entities in a paged way
        /// </summary>
        /// <param name="firstResult"></param>
        /// <param name="maxResults"></param>
        /// <returns></returns>
        IList<T> FindAll(int firstResult, int maxResults);

        /// <summary>
        /// Finds by text
        /// </summary>
        /// <param name="value"></param>
        /// <param name="Args"></param>
        /// <returns></returns>
        IList<T> FindByText(String value, params string[] Args);

        /// <summary>
        /// Finds by text with a defined filter 
        /// </summary>
        /// <param name="text"></param>
        /// <param name="columns"></param>
        /// <param name="filterColumn"></param>
        /// <param name="filterValue"></param>
        /// <returns></returns>
        IList<T> FindByTextFiltered(String text, String[] columns, String filterColumn, object filterValue);

    }
}

